﻿using Autofac.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Builder;
using System;
using System.Collections.Generic;
using System.Text;

namespace DotNetExtensions.Core.Autofac
{
    public static class AutofacExtensions
    {
        public static IApplicationBuilder UseAutofac(this IApplicationBuilder app, RegistTypeResolver resolver)
        {
            resolver.LifetimeScope = app.ApplicationServices.GetAutofacRoot();
            return app;
        }
    }
}
